Skip to content

[DEV-2711] Disable GraphQL Introspection on Hasura#1821

Merged
andy-t-wang merged 2 commits intomainfrom
0x1/DEV-2711/IntrospectionGraphQL
Mar 9, 2026
Merged

[DEV-2711] Disable GraphQL Introspection on Hasura#1821
andy-t-wang merged 2 commits intomainfrom
0x1/DEV-2711/IntrospectionGraphQL

Conversation

@0x1
Copy link
Copy Markdown
Contributor

@0x1 0x1 commented Mar 7, 2026

PR Type

  • Regular Task
  • Bug Fix
  • QA Tests

Description

DEV-2711 — Disable GraphQL Introspection on Hasura

  • Hasura's /v1/graphql endpoint accepted unauthenticated __schema introspection queries, exposing schema metadata to anyone
  • Fixed by adding all non-admin roles to disabled_for_roles in hasura/metadata/graphql_schema_introspection.yaml — this is applied automatically at Hasura startup in all environments, including production, with no infra changes needed
  • Admin secret requests bypass this by design (Hasura hardcodes it), so the console and codegen are unaffected

NOTE: i would have preferred to have explicitly enabling roles instead of explicitly disabling as we do here. from a security standpoint an allowlist is strictly better — new roles are blocked by default rather than open until someone
remembers to add them, but Hasura's metadata config only exposes disabled_for_roles (a denylist). There's no enabled_for_roles equivalent.

Checklist

  • I have self-reviewed this PR.
  • I have left comments in the code for clarity.
  • I have added necessary unit tests.
  • I have updated the documentation as needed.

@0x1 0x1 temporarily deployed to development March 7, 2026 01:30 — with GitHub Actions Inactive
@0x1
Copy link
Copy Markdown
Contributor Author

0x1 commented Mar 7, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 926a58d4fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hasura/metadata/graphql_schema_introspection.yaml
@0x1 0x1 temporarily deployed to development March 7, 2026 01:37 — with GitHub Actions Inactive
@0x1
Copy link
Copy Markdown
Contributor Author

0x1 commented Mar 7, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@0x1 0x1 marked this pull request as ready for review March 7, 2026 01:45
@andy-t-wang
Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@andy-t-wang andy-t-wang merged commit 439dae4 into main Mar 9, 2026
15 checks passed
@andy-t-wang andy-t-wang deleted the 0x1/DEV-2711/IntrospectionGraphQL branch March 9, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants